/* ************************************************************************

   Copyright:
     2008 openWorks

   License:
     LGPL: http://www.gnu.org/licenses/lgpl.html
     See the LICENSE file in the project's top-level directory for details.

   Authors:
     * Martín Alejandro Paz
     
   Contributors:
     * Juan Matias Granda   	

************************************************************************ */

/**
* TODO
 */
qx.Class.define("qx.ui.form.ow.Scroll",
{

  /*
  *****************************************************************************
     EVENTS
  *****************************************************************************
  */
	events:
	{
	},
	extend : qx.ui.container.Scroll,
	/**
	* @param layout Capa contenedora.
	* @param  width Ancho que tendrá la capa.
	* @param  height Largo que tendrá la capa.
	*/
	construct : function (layout, width, height)
	{
		this.base(arguments);
		if (layout)
			this._layer = layout;
		else
			this._layer = new qx.ui.layout.Basic();

		if (width) this.setWidth(width);
		if (height) this.setHeight(height);
			
		this._container = new qx.ui.container.Composite(this._layer);
		this._getContentPaddingTarget().add(this._container);
	},
	
/*
*****************************************************************************
 MEMBERS
*****************************************************************************
*/
	members :
	{
		_layout : null,
		_container : null,
		/**
		* TODO
		*/
		add : function (widget, maps)
		{
			if (maps)
				this._container.add(widget, maps);
			else
				this._container.add(widget);
		},
		getContainer : function () { return this._container; }
	}
});
